package com.ling.levelCon.data
{
	import org.taomee.ds.HashMap;

	/**
	 * manage data of levels
	 * @author hongxuan
	 * 
	 */	
	public class LevelDataManager
	{
		private static var hashMap:HashMap;
		/**
		 * backup deleted levels
		 */		
		private static var deleteHashMap:HashMap;
		
		public function LevelDataManager()
		{
		}
		private static function setup():void
		{
			hashMap = new HashMap;
			
			deleteHashMap = new HashMap;
		}
		
		public static function addNewLevel(levelVo:LevelVo):void
		{
			hashMap.add(levelVo.level,levelVo);
		}
		
		public static function deleteLevel(level:uint):void
		{
			var vo:LevelVo = hashMap.getValue(level);
			deleteHashMap.add(level,vo);
			
			hashMap.remove(level);
		}
	}
}